const User = require('../../models/user')

module.exports = (req,res) => {
  const _id = req.body._id
  // console.log(req.body);
  User.findById({_id},(err,userDoc) => {
    if (err) {
      res.status(500).json({
        err_code: 500,
        message:err.message
      })
    }
    res.status(200).json({
      err_code: 0,
      data: userDoc,
      message: 'success'
    })

  })
}